
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 1650. -- [Usaco2006 Dec]River Hopscotch -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>1650: [Usaco2006 Dec]River Hopscotch</h2><span class=green>Time Limit: </span>5 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>64 MB<br><span class=green>Submit: </span>120&nbsp;&nbsp;<span class=green>Solved: </span>74<br>[<a href='submitpage.php?id=1650'>Submit</a>][<a href='problemstatus.php?id=1650'>Status</a>][<a href='bbs.php?id=1650'>Discuss</a>]</center><h2>Description</h2><div class=content>Every year the cows hold an event featuring a peculiar version of
hopscotch that involves carefully jumping from rock to rock in a
river. The excitement takes place on a long, straight river with a
rock at the start and another rock at the end, L units away from
the start (1 <= L <= 1,000,000,000). Along the river between the
starting and ending rocks, N (0 <= N <= 50,000) more rocks appear,
each at an integral distance Di from the start (0 < Di < L).

To play the game, each cow in turn starts at the starting rock and
tries to reach the finish at the ending rock, jumping only from
rock to rock. Of course, less agile cows never make it to the final
rock, ending up instead in the river.

Farmer John is proud of his cows and watches this event each year.
But as time goes by, he tires of watching the timid cows of the
other farmers limp across the short distances between rocks placed
too closely together. He plans to remove several rocks in order to
increase the shortest distance a cow will have to jump to reach the
end. He knows he cannot remove the starting and ending rocks, but
he calculates that he has enough resources to remove up to M rocks
(0 <= M <= N).

FJ wants to know exactly how much he can increase the shortest
distance *before* he starts removing the rocks. Help Farmer John
determine the greatest possible shortest distance a cow has to jump
after removing the optimal set of M rocks.

数轴上有n个石子，第i个石头的坐标为Di，现在要从0跳到L，每次条都从一个石子跳到相邻的下一个石子。
现在FJ允许你移走M个石子，问移走这M个石子后，相邻两个石子距离的最小值的最大值是多少。</div><h2>Input</h2><div class=content>* Line 1: Three space-separated integers: L, N, and M

* Lines 2..N+1: Each line contains a single integer indicating how far
        some rock is away from the starting rock. No two rocks share
        the same position.

</div><h2>Output</h2><div class=content>* Line 1: A single integer that is the maximum of the shortest
        distance a cow has to jump after removing M rocks

</div><h2>Sample Input</h2>
			<div class=content><span class=sampledata>25 5 2<br />
2<br />
14<br />
11<br />
21<br />
17<br />
<br />
5 rocks at distances 2, 11, 14, 17, and 21. Starting rock at position<br />
0, finishing rock at position 25.<br />
</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>4<br />
<br />
OUTPUT DETAILS:<br />
<br />
Before removing any rocks, the shortest jump was a jump of 2 from<br />
0 (the start) to 2. After removing the rocks at 2 and 14, the<br />
shortest required jump is a jump of 4 (from 17 to 21 or from 21 to<br />
25).<br />
</span></div><h2>HINT</h2>
			<div class=content><p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search='></a></p></div><center>[<a href='submitpage.php?id=1650'>Submit</a>][<a href='problemstatus.php?id=1650'>Status</a>][<a href='bbs.php?id=1650'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
